//生命全局app
var app = getApp();

Page({

  /**
   * 页面的初始数据
   */
  data: {

  },
  //添加身份证正反面
  addimage1:function(){
    var id=1
    var naa ='个人信息授权书照片'
    wx.navigateTo({
      url: '../addimage/addimage?len=1&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  //驾驶证正反面
  addimage2:function(){
    var id=2
    var naa = '个人信息授权书+手持身份证'
    wx.navigateTo({
      url: '../addimage/addimage?len=1&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage3:function(){
    var id=3
    var naa = '个人贷款申请书正反面各一张'
    wx.navigateTo({
      url: '../addimage/addimage?len=2&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage4:function(){
    var id=4
    var naa = '个人贷款申请书反面+手持身份证'
    wx.navigateTo({
      url: '../addimage/addimage?len=1&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage5:function(){
    var id=5
    var naa = '申请表照片'
    wx.navigateTo({
      url: '../addimage/addimage?len=1&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage6:function(){
    var id=6
    var naa = '身份证正反面各一张'
    wx.navigateTo({
      url: '../addimage/addimage?len=2&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage7:function(){
    var id=7
    var naa = '驾驶证正副本各一张'
    wx.navigateTo({
      url: '../addimage/addimage?len=2&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage8:function(){
    var id=8
    var naa = '其他资料'
    wx.navigateTo({
      url: '../addimage/addimage?len=9&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage9:function(){
    var id=9
    var naa = '投保单签字照'
    wx.navigateTo({
      url: '../addimage/addimage?len=1&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage10:function(){
    var id=10
    var naa = '投保声明'
    wx.navigateTo({
      url: '../addimage/addimage?len=1&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },

  addimage11:function(){
    var id=11
    var naa = '挂靠协议(公户)'
    wx.navigateTo({
      url: '../addimage/addimage?len=2&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage12:function(){
    var id=12
    var naa = '购车合同'
    wx.navigateTo({
      url: '../addimage/addimage?len=1&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage13:function(){
    var id=13
    var naa = '推荐函'
    wx.navigateTo({
      url: '../addimage/addimage?len=1&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage14:function(){
    var id=14
    var naa = '担保函'
    wx.navigateTo({
      url: '../addimage/addimage?len=1&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage15:function(){
    var id=15
    var naa = '首付款凭证'
    wx.navigateTo({
      url: '../addimage/addimage?len=1&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage16:function(){
    var id=16
    var naa = '客户告知书'
    wx.navigateTo({
      url: '../addimage/addimage?len=1&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage17:function(){
    var id=17
    var naa = '代扣授权委托书'
    wx.navigateTo({
      url: '../addimage/addimage?len=1&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage18:function(){
    var id=18
    var naa = '账户查询授权书'
    wx.navigateTo({
      url: '../addimage/addimage?len=1&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage19:function(){
    var id=19
    var naa = '租赁合同'
    wx.navigateTo({
      url: '../addimage/addimage?len=4&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage20:function(){
    var id=20
    var naa = '抵押合同'
    wx.navigateTo({
      url: '../addimage/addimage?len=2&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage21:function(){
    var id=21
    var naa = '月供确认书'
    wx.navigateTo({
      url: '../addimage/addimage?len=1&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage22:function(){
    var id=22
    var naa = '委托付款书'
    wx.navigateTo({
      url: '../addimage/addimage?len=9&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },
  addimage23:function(){
    var id=23
    var naa = '其它资料'
    wx.navigateTo({
      url: '../addimage/addimage?len=2&typeId=' + id + "&imgId=" + this.data.imageInfo.id +'&naa='+naa,
    })
  },

  submit: function () {
    wx.navigateTo({
      url: '../order/order?code=5&syn=photo'
    })
  },
  addmoveinfo: function () {
    wx.navigateTo({
      url: '../image2/image2'
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    let that = this;

    that.setData({
      orderId: options.orderId
    })

    wx.request({
      url: app.globalData.serviceUrl + '/wcImgPath/getByOrderId',
      data: {
        orderNum: options.orderId
      },
      method: "GET",
      success(res) {
        if(res.data.success) {
          that.setData({
            imageInfo: res.data.data
          });
        }
      }
    })
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function (options) {
    let that = this;

    wx.request({
      url: app.globalData.serviceUrl + '/wcImgPath/refreshFieldStatus',
      data: {
        orderNum: that.data.orderId
      },
      method: "GET",
      success(res) {
        if(res.data.success) {
          that.setData({
            imageInfo: res.data.data
          });
        }
      }
    })

  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})